/**
 * 
 */
var writeBtn;


function general(){

}
function input(){
	var hf=document.getElementById("loginId");
	
	if(hf.value==""){
		location.href="login_main.jsp";
	}
	else{
	
	var f=document.frm;
	var w=document.getElementById('writeBtn');
	f.action='guest_main.jsp?inpage=../guest/visitMain.jsp&t=1';
	f.submit();
	}
}

function gomain(){
	location.href='guest_main.jsp?inpage=../guest/visitMain.jsp';
}

function modiOpen(vno, nowPage){
	var f = document.hiddenFrm2;
	f.vno.value=vno;
	f.nowPage=nowPage;
	f.action='guest_main.jsp?inpage=../guest/visitMain.jsp&moveModify='+vno+'&nowPage='+nowPage;
	
	f.submit();
}
function modiChoice(vno){
	var f=document.hiddenFrm;
	var g = document.getElementById('modifyContent2');
	f.action='guest_main.jsp?inpage=../guest/modifyHandling.jsp';
	f.content.value= g.value;
	f.vno.value=vno;
	f.submit();
}
function repleInput(vno){
	var mf = document.hiddenreple;
	var rc = document.getElementById("re"+vno);
	mf.rcontent.value=rc.value;
	mf.vno.value=vno;
	mf.action = 'guest_main.jsp?inpage=../guest/repleHandling.jsp';
	mf.submit();
}
function deleteChoice(vno, nowPage){
	var f=document.hiddenFrm2;
	f.vno.value=vno;
	f.nowPage.value=nowPage
	f.action='guest_main.jsp?inpage=../guest/deleteHandling.jsp&moveModify='+vno+'&nowPage='+nowPage;
	f.submit();
}


function goPage(page){           
	//location.href=url+'view.jsp&page=' + page;  //메소드가 get타입
	var mf = document.hiddenFrm2 ;
	if(page<=0){
		mf.nowPage.value=1;
	}

	else{
		mf.nowPage.value = page ;
	}
	mf.find.value = document.visit_list_frm.find.value ; //find에 find값 넘겨줌
	mf.action = '../jsp/guest_main.jsp?inpage=../guest/visitMain.jsp';
	
	mf.submit();
	
}
function nextPage(page, endPage){  // 1   ,10
	var mf=document.hiddenFrm2;
	if(page <endPage){  //9 10
		mf.nowPage.value=page+1;
	}
	else{
		mf.nowPage.value=endPage;
	}
	mf.find.value=document.visit_list_frm.find.value;
	mf.action='../jsp/guest_main.jsp?inpage=../guest/visitMain.jsp';
	
	mf.submit();
}

function goView(page, vno){
	var mf = document.hiddenFrm2 ;
	mf.nowPage.value = page ;
	mf.vno.value = vno;
	mf.find.value = document.visit_list_frm.find.value ;
	mf.action = 'guest_main.jsp?inpage=../guest/visitMain.jsp';
	
	mf.submit();
}


function Init(){
	general();
}